#include "ChatRoom.h"
#include "User.h"

void ChatRoom::registerUser(User* pUser)
{
    _vecpUser.push_back(pUser);
}

void ChatRoom::sendMessage(const std::string& strMessage, User* pSend)
{
    for (auto user : _vecpUser)
    {
        if (user != pSend && user != nullptr)
        {
            user->receive(strMessage, pSend);
        }
    }
}